1
general::
Function very well, have a good effect or outcome, as in That knife-sharpener works like a charm, or Her deferential manner worked like a charm; he agreed to everything they'd asked for. This expression uses charm in the sense of "a magic spell." [Mid-1800s] Also see WORK WONDERS.
American Heritage Idioms